package BehaviorModel.strategyModel.discountCalculation;

/**
 * 功能描述: 固定金额折扣
 * 2024/05/16
 *
 * @see DiscountStrategy
 * ZhangYi
 */
public class FixedAmountDiscount implements DiscountStrategy{

    // 固定金额
    private final double discountAmount;

    public FixedAmountDiscount(double discountAmount) {
        this.discountAmount = discountAmount;
    }
    @Override
    public double calculateDiscount(double price) {
        return price - discountAmount;
    }
}
